<template>
  <div class="search-panel"> </div>
</template>

<script lang="ts" setup>
  import { reactive, ref } from 'vue';
  import useLoading from '@/hooks/loading';
  import { ValidatedError } from '@arco-design/web-vue/es/form/interface';
  import { Message } from '@arco-design/web-vue';

  const errorMessage = ref('');
  const { loading, setLoading } = useLoading();
  const searchForm = reactive({
    keyword: '',
    position: '',
  });

  const handleSubmit = async ({
    errors,
    values,
  }: {
    errors: Record<string, ValidatedError> | undefined;
    values: Record<string, any>;
  }) => {
    if (loading.value) return;
    if (!errors) {
      setLoading(true);
      try {
        console.log('员工分页列表查询');
        Message.success('查询完成');
      } catch (err) {
        errorMessage.value = (err as Error).message;
      } finally {
        setLoading(false);
      }
    }
  };
</script>

<style scoped lang="less">
  .search-panel {
    height: 100%;
    width: 100%;
    padding: 8px;
  }
</style>
